import getUserInfo from './libs/function/getUserInfo'
import getUserPhone from "./libs/function/getUserPhone";
import authorization from "./libs/function/authorization";
import authorize from "./libs/function/authorize"
import subscribeMessage from './libs/function/subscribeMessage'
import showLoading from "./libs/function/showLoading";
import toast from "./libs/function/toast";
import navigateTo from "./libs/function/navigateTo";
import {timeFormat,getDate} from './libs/function/timeFormat';
import zIndex from "./libs/function/zIndex";

// $cu挂载到uni对象上
const $cu = {
  getUserInfo,
  getUserPhone,
  authorization,
  subscribeMessage,
  authorize,
  showLoading,
  toast,
  navigateTo,
  timeFormat,
  getDate,
  zIndex
}

uni.$cu = $cu

const install = Vue => {
  Vue.prototype.$cu = $cu
  uni.$cu.eventBus = new Vue();
}

export default {
  install
}
